#include <stdio.h>
#include <string.h>

int main(){
  char str[] = "abc def ghi jkl";
  printf("before:%s\n", str);

  printf("strtok:");
  char *ptr = strtok(str, " "); 
  printf("%s ", ptr);
  while((ptr=strtok(NULL," ")))
  printf("%s ", ptr);
  printf("\n");

  printf("after:%s\n", str);
}
